<?php
/**
 * True Gallery Category template file
 *
 * @version 2.5
 * @author Alexey N. Brin (userxp@joomlaportal.ru)
 * @homepage http://truegallery.ru 
 * @filename category.tpl.php
 * @package True Gallery
 * @copyright (C) 2008-2009 by joomlatune.ru
 * @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
 * 
 * THIS GALLERY is an EVOLUTION of AkoGallery -> PonyGallery -> DatsoGallery
 *
 * If you fork this to create your own project, 
 * please make a reference to True Gallery someplace in your code 
 * and provide a link to http://www.joomlatune.ru
 *
 **/

$block_width		= 346;
$cpo_width			= $block_width-6;
$border				= 1;
$img_block_width	= $cpo_width - $border * 2;
$img_block_height	= 180;
$padding			= 8;


defined('_VALID_MOS') or defined('_JEXEC') or die('Direct Access to this location is not allowed.');
?>
<style>
.news_item {
	float: left;
	width: <?php echo $block_width; ?>px;
	/*border: 1px solid red;*/
	margin-bottom: 20px;
}
.contentpaneopen {
	width: <?php echo $cpo_width; ?>px;
}
.subcat_img {
	background-color: #fff;
	width		: <?php echo $img_block_width-$padding*2; ?>px;
	height		: <?php echo $img_block_height; ?>px;
	padding		: <?php echo $padding; ?>px;
	border		: <?php echo $border; ?>px solid #ccc;
}
.subcat_img div {
	width		: <?php echo $img_block_width - $border*2 - $padding*2; ?>px;
	height		: <?php echo $img_block_height; ?>px;
	border		: <?php echo $border; ?>px solid #ccc;
	overflow	: hidden;
	padding		: 0px;
	margin		: 0px;
}
.subcat_img div img {
	width		: <?php echo $img_block_width; ?>px;
	border: none !important;
	padding: 0px;
	margin: 0px;
}
.newsitem_text ul {
	display:block;
	width: auto;
}
</style>

<!--begin of category -->
<?php 
$html = '';

$src = buildPictureAjaxLink( $tpl->thumbid, $tpl->thumbcid, $Itemid, 1, $tpl->imgfilename);
//xdump( $src );

?>
<!-- <a href="<?php echo $src; ?>" >CHECK IMG LINK</a> -->
<div class="news_item">
	<div class="contentpaneopen">
		<h2 class="contentheading">
			<a href="<?php echo $tpl->catlink; ?>" class="contentpagetitle"><?php echo $tpl->name; ?></a>
		</h2>
		<div class="newsitem_text">
			<ul>
				<?php echo $tpl->imagesinfo ? '<li>'.$tpl->imagesinfo.'</li>' : ''; ?>
			</ul>
			<div class="subcat_img" >
				<div><a href="<?php echo $tpl->catlink; ?>" title="<?php echo $tpl->name; ?>"><img src="<?php echo $src; ?>" /></div></a>
			</div>
			<ul style="min-height:50px;">
				<?php echo $tpl->description ? '<li>'.$tpl->description.'</li>' : ''; ?>
				<?php echo $tpl->author ? '<li>'.JText::_('TG_AUTHOR').': '.$tpl->author.'</li>' : ''; ?>
			</ul>
		</div>
	</div>
</div>
